#ifndef DISPLAYSETTINGS_H
#define DISPLAYSETTINGS_H

#include <QtCore/QString>
#include <QtGui/QColor>
#include <QtGui/QFont>

QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE

namespace CodeEdit {

/**
 * Settings that describes how the code editor looks.
 */
struct DisplaySettings
{
    DisplaySettings();

    void toSettings(QSettings* s) const;
    void fromSettings(QSettings* s);

    bool equals(const DisplaySettings& ds) const;

    //! [color]
    QColor wrapEdgeColor;
    QColor wrapEdgeFillColor;
    QColor currentLineFillColor;
    QColor lineNumbersColor;
    QColor lineNumbersFillColor;
    QColor foldingMarkersFillColor;

    //! [misc]
    bool displayLineNumbers;     // Display line numbers?
    bool textWrapping;           // Enable text wrapping?
    bool showWrapColumn;         // Display right margin?
    int wrapColumn;              // Display right margin at column: (80)
    bool visualizeWhitespace;    // Visualize whitespace?
    bool displayFoldingMarkers;  // Display folding markers?
    bool highlightCurrentLine;   // Highlight current line?
    bool highlightBlocks;        // Highlight blocks?
    bool animateMatchingParentheses; // Animate matching parentheses?
    bool markTextChanges;            // Mark text changes?
    bool autoFoldFirstComment;       // Auto fold first comment(License comment)?
    bool centerCursorOnScroll;       // Center cursor on scroll?
};

inline bool operator==(const DisplaySettings& ds1, const DisplaySettings& ds2) { return ds1.equals(ds2); }
inline bool operator!=(const DisplaySettings& ds1, const DisplaySettings& ds2) { return !ds2.equals(ds2); }

} // namespace CodeEdit

#endif // DISPLAYSETTINGS_H
